package com.citywithincity.utils.dataconvert;

import com.citywithincity.db.interfaces.IValueConvert;

public class AccountMask implements IValueConvert {

	@Override
	public Object convert(Object value) {
		String v = (String)value;
		char[] chars = new char[v.length()];
		int pos = v.length()-1;
		v.getChars(0, pos, chars, 0);
		pos--;
		for(int i=1 ; i < pos ; ++i){
			chars[i] = '*';
		}
		return new String(chars);
	}

}
